Noise reduction system, noise reduction method, recording medium, and electronic camera

ABSTRACT

A noise reduction system comprises an inputting unit inputting image data, and a noise reduction unit performing a process for removing noise of the image data input by the inputting unit. The noise reduction unit includes a representative value calculating unit calculating a representative value from the level values of a plurality of pixels in a predetermined direction, which include an observed pixel of the input image data, a representative value selecting unit selecting one representative value according to a predetermined condition from among a plurality of representative values which are calculated by the representative value calculating unit and correspond to a plurality of directions, and a replacing unit replacing the level value of the observed pixel with the representative value selected by the representative value selecting unit.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to an image processing technique,and more particularly, to a technique removing noise from an image thatis represented by digital data.

[0003] 2. Description of the Related Art

[0004] Conventionally, a smoothing filter is generally used in a processfor removing noise of an image that is represented by digital data.

[0005] For example, Japanese Patent Publication No. 2000-069291discloses a technique for preventing an image from being degraded bychanging the characteristic of an applied smoothing filter according tothe characteristic of input image data.

[0006] Additionally, for example, Japanese Patent No. 3165225 disclosesa technique for removing extraneous noise by applying a noise removalfilter (smoothing filter) only to a portion of a low luminance level,which is significantly influenced by extraneous noise applied to aluminance signal, in luminance to density conversion.

[0007] However, with the noise removal techniques using such smoothingfilters, noise removal is made by performing a process such as a processfor replacing the level value of an observed pixel with an average ofthe level values of neighboring pixels. Therefore, there is a problemthat the image obtained with that process is degraded in resolution,and, namely, the image becomes a “blurred” image.

SUMMARY OF THE INVENTION

[0008] The present invention was developed to overcome the abovedescribed problem, and aims at enabling noise to be removed whilepreventing resolution from being degraded.

[0009] A noise reduction system, which is a first preferred embodimentof the present invention, comprises an inputting unit inputting imagedata, and a noise reduction unit performing a process for removing noiseof the image data input by the inputting unit. The noise reduction unitis configured to comprise: a representative value calculating unitcalculating a representative value from the level values of a pluralityof pixels in a predetermined direction, which include an observed pixelof the input image data; a representative value selecting unit selectingone representative value according to a predetermined condition fromamong a plurality of representative values which are calculated by therepresentative value calculating unit, and correspond to a plurality ofdirections; and a replacing unit replacing the level value of theobserved pixel with the representative value selected by therepresentative value selecting unit.

[0010] With the above described configuration, the level value of anobserved pixel is replaced with one representative value, which isselected according to a predetermined condition from amongrepresentative values calculated from the level values of a plurality ofpixels including the observed pixel respectively for a plurality ofdirections, whereby noise of image data can be removed while preventingthe resolution from being degraded.

BRIEF DESCRIPTION OF THE DRAWINGS

[0011]FIG. 1 is a block diagram exemplifying the configuration of anelectronic camera according to a first preferred embodiment of thepresent invention;

[0012]FIG. 2 is a flowchart exemplifying shooting processing of theelectronic camera;

[0013]FIG. 3 is a flowchart exemplifying the process of a noisereduction means, which is performed in a process of S209;

[0014]FIG. 4 is a schematic diagram exemplifying the storage of imagedata being processed in an SDRAM in the process performed by the noisereduction means;

[0015]FIG. 5 is a flowchart exemplifying the noise reduction process;

[0016]FIG. 6 is a schematic diagram exemplifying 4 pixels in apredetermined direction, which correspond to each directionidentification number, and include an observed pixel;

[0017]FIG. 7 is a schematic diagram exemplifying the number ofcalculation directions, coefficients, and the number of noise reductionstimes, which are determined according to values set by a gain settingmeans, an aperture correction setting means, and a recording image sizesetting means;

[0018]FIG. 8A is a schematic diagram exemplifying image data (inputdata) before the noise reduction process is performed;

[0019]FIG. 8B is a schematic diagram exemplifying an LPF (Low PassFilter) used in a conventional noise reduction process;

[0020]FIG. 8C is a schematic diagram showing image data obtained withthe conventional noise reduction process;

[0021]FIG. 8D is a schematic diagram showing image data obtained withthe process shown in FIG. 5;

[0022]FIG. 9 is a block diagram exemplifying the configuration of anoise reduction system according to a second preferred embodiment of thepresent invention; and

[0023]FIG. 10 is a schematic diagram exemplifying storage media on whicha program is recorded.

DESCRIPTION OF THE REFERRED EMBODIMENT

[0024] Hereinafter, preferred embodiments according to the presentinvention are explained with reference to the drawings.

[0025]FIG. 1 is a block diagram exemplifying the configuration of anelectronic camera according to a first preferred embodiment of thepresent invention.

[0026] As shown in this figure, this electronic camera comprises: ashooting lens 1; a CCD (Charge-Coupled Devices) 2 opt-electricallyconverting an optical subject image formed by the shooting lens 1, andgenerating an electric signal corresponding to the subject image; a CDS(Correlated Double Sampling) circuit 3 extracting an image signalcomponent from the output signal of the CCD 2; an AGC (Automatic GainControl) circuit 4 adjusting the level of the output signal of the CDScircuit 3 to a predetermined gain value; a gain setting means 5 settinga gain value according to an instruction from a user; an A/D converter 6converting an analog image signal output from the AGC circuit 4 to adigital image signal, which is digital data; a white balance correctionunit (WB) 7 making a white balance correction for a color signal of thedigital image signal; a color separation circuit 8 separating an imagesignal, which is obtained by removing a high-frequency component fromthe image signal for which the white balance correction process isperformed by the white balance correction unit 7, into respective colorsignals of 3 primary colors, such as an R0 signal, a G0 signal, and a B0signal; a color matrix correction circuit 9 making a color correctionfor improving color reproduction; a color γ correction circuit 10performing a gamma (γ) correction process of a color signal; a YCconversion circuit 11 converting the respective R, G, and B colorsignals into a luminance signal YL and 2 color difference signals Cr andCb; an image processing circuit 12 performing image processes such asachromatization, color generation, etc. for the YL, the Cr, and the Cbsignals; and a noise reduction means 13 performing a noise reductionprocess for the color difference signals Cr and Cb, for which the imageprocesses have been performed.

[0027] Furthermore, this electronic camera comprises: an edge signalextraction/aperture correction circuit 14 extracting only a luminancesignal (Y signal) from a digital image signal, which is the output ofthe above described A/D converter 6, and making an edge emphasis of apredetermined aperture correction level after extracting an outlinesignal (hereinafter referred to as an edge signal) by removing alow-frequency component from the Y signal; an aperture correctionsetting means 15 setting the aperture correction level according to aninstruction from the user; a noise reduction means 16 performing a noisereduction process similar to that of the above described noise reductionmeans 13 for the edge signal; an adder 17 generating a luminance signalY by adding the luminance signal YL, for which the above described imageprocesses have been performed, to the edge signal output from the noisereduction means 16; an image size conversion means 18 converting(resizing) image data obtained from the luminance signal Y, which is theoutput of the adder 17, and the color difference signals Cr and Cb,which are the outputs of the above described noise reduction means 13,to a predetermined recording image size; a recording image size settingmeans 19 setting the recording image size according to an instructionfrom the user; and a recording means 20 recording an image the size ofwhich is converted by the image size conversion means 18 onto arecording medium not shown.

[0028] Note that a block (constituent element) between the adder 17 andthe image size conversion means 18 indicates that the luminance signal Yis confirmed, whereas a block between the noise reduction means 13 andthe image size conversion means 18 indicates that the color differencesignals Cr and Cb are confirmed.

[0029] Additionally, the above described noise reduction means 13 andnoise reduction means 16 are controlled based on conditions set by theabove described gain setting means 5, aperture correction setting means15, and recording image size setting means 19.

[0030] Furthermore, this electronic camera also comprises a CPU (CentralProcessing Unit) which controls the operations of the whole of theelectronic camera by executing a camera program prestored in an internalmemory, a release button which instructs shooting preparation andshooting start, a 1st release switch which is turned on when theshooting preparation is instructed, a 2nd release switch which is turnedon when the shooting start is instructed, an SDRAM (Synchronous DRAM) inwhich image data being processed by the noise reduction means 13 or 16,etc., are temporarily stored, and the like, although these constituentelements are not shown.

[0031] The electronic camera in this configuration example is configuredas described above.

[0032] Next, control processes of the electronic camera, which areperformed by the CPU of the electronic camera having the above describedconfiguration, are explained. The CPU reads and executes the cameraprogram stored in the internal memory, whereby the control processes ofthis electronic camera are implemented.

[0033]FIG. 2 is a flowchart exemplifying the shooting process of thiselectronic camera. The flow shown in this figure is started when the 1strelease switch is turned on by pressing the release button halfway, anda shooting preparation instruction is issued.

[0034] Firstly, in S201, an AF (Auto Focus) control process forobtaining the focusing position of a focus lens, and for moving thefocus lens to the focusing position is performed.

[0035] In S202, an AE (Auto Exposure) control process for metering thelight amount of a subject, and for setting an aperture value and ashutter speed value according to a result of the metering is performed,and at the same time, a process for determining whether or not to makestrobe light emission according to the result of the metering isperformed.

[0036] Subsequent processes in and after S203 are started when the 2ndrelease switch is turned on by completely pressing down the releasebutton, and a shooting start instruction is issued.

[0037] In S203, the amount of strobe light emission is calculatedaccording to the result of the above described metering of the lightamount of the subject. However, if it is determined that the strobelight emission is not made in the preceding step, this step is notperformed.

[0038] In S204, an aperture mechanism not shown is driven, and theaperture is moved to the position according to the above described setaperture value.

[0039] In S205, the strobe light emission and exposure are made. Namely,the strobe light-emission is made according to the above describedamount of strobe light emission, and the subject image at that time isformed on the CCD 2 by the shooting lens 1. However, if it is determinedthat the strobe light emission is not made in the process of S202, thisstrobe light emission is not made.

[0040] In S206, a shutter mechanism not shown is driven, and the shutteris closed.

[0041] In S207, the shot image is read. That is, an electric signalcorresponding to the subject image formed on the CCD 2 is generated.

[0042] In S208, the shutter mechanism not shown is driven, and theshutter is opened.

[0043] In S209, the predetermined processes including the noisereduction process via the predetermined constituent elements, which areexplained with reference to FIG. 1, and the like are performed for theelectric signal (the output signal of the CCD 2) which is obtained bythe above described process of S207 and corresponds to the subjectimage, so that image data in a format recorded on the recording means 20is obtained.

[0044] In S210, the image data in the format recorded on the recordingmeans 20, which is obtained in the above described step, is recorded onthe recording means 20, and this process is terminated.

[0045] The processes up to this point are the shooting processing. TheCPU performs this processing, whereby image data that represents animage obtained by shooting is recorded on the recording means 20.

[0046] Next, the process of the noise reduction means 13 or the noisereduction means 16, which is performed in the above described process ofS209, is explained.

[0047]FIG. 3 is a flowchart exemplifying the process of the noisereduction means 13 or the noise reduction means 16. The flow shown inthis figure is a process started when image data in a correspondingpredetermined format, which is explained with reference to FIG. 1, isinput to the noise reduction means 13 or the noise reduction means 16.Additionally, the process of the noise reduction means 13 and theprocess of the noise reduction means 16 may be performed in parallel.Or, one of the processes may be started after the other is terminated.

[0048] In this figure, firstly, in S301, it is determined whether or nota noise reduction setting is OFF. If the result of this determination is“Yes”, the input image data is output from the noise reduction means 13(or 16) unchanged, and this flow is terminated. On the other hand, ifthe result of the determination is “No”, the process proceeds to S302.

[0049] The ON/OFF setting of the noise reduction is made according tothe values set by the gain setting means 5, the aperture correctionsetting means 15, and the recording image size setting means 19. Itsdetails will be described later with reference to FIG. 7.

[0050] In S302, the value of the counter is set to 0 (Count=0).

[0051] In S303, it is determined whether or not the value of the counteris smaller than the number of times that the noise reduction is made. Ifthe result of this determination is “Yes”, the process proceeds to S304.If the result of the determination is “No”, the image data obtained atthat time is output from the noise reduction means 13 (or 16), and thisflow is terminated.

[0052] Also the number of times that the noise reduction is made is setaccording to the values set by the gain setting means 5, the aperturecorrection setting means 15, and the recording image size setting means19, and its details will be described later with reference to FIG. 7.

[0053] In S304, a noise reduction process to be described later withreference to FIG. 5 is performed.

[0054] In S305, the value of the counter is incremented, and the processreturns to S303.

[0055] The processes up to this point are the process of the noisereduction means 13 or the noise reduction means 16. The CPU performsthis process, whereby the noise reduction process is performed by theset number of times that the noise reduction is made.

[0056] In the process performed by the noise reduction means 13 or 16,image data being processed is stored in the SDRAM as occasion demands.

[0057]FIG. 4 is a schematic diagram exemplifying the storage of imagedata being processed in the SDRAM.

[0058] As shown in this figure, an image 1 area and an image 2 area arereserved as 2 image areas in the SDRM. The image data (input image)input to the noise reduction means 13 (or 16) is first stored in theimage 1 area. Then, the image data stored in the image 1 area is read,and the image data (output image) for which the first noise reductionprocess (the first NR) has been performed is stored in the image 2 area.Then, the image data (input image) stored in this image 2 area is read,and the image data (output image) for which the second noise reductionprocess (the second NR) has been performed is again stored in the image1 area.

[0059] Thereafter, in a similar manner, the image data (input image)stored in one of the image areas is read, and the image data (outputimage) for which the noise reduction process has been performed isstored in the other image area.

[0060] As described above, the image data being processed by the noisereduction means 13 (or 16) is alternately stored in the 2 image areasreserved in the SDRAM by the set number of times that the noisereduction is made.

[0061] Next, the noise reduction process shown in S304 of FIG. 3 isexplained.

[0062]FIG. 5 is a flowchart exemplifying the noise reduction process.

[0063] In this figure, firstly in S501, an image size represented by thenumber of pixels is obtained from image data to be processed, and theobtained image size is defined to be Win×Hin. Additionally, the pixel atthe upper left of the image represented by the image data is defined asan observed pixel, and the coordinates of the observed pixel are set to(0,0). This image size Win×Hin, andthecoordinates (x,y)oftheobservedpixel are stored in a predetermined area of the abovedescribed SDRAM as occasion demands, and read depending on need.

[0064] In S502, it is determined whether or not the x coordinate of theobserved pixel is smaller than 3, and its y coordinate is smaller than3. If the result of the determination is “Yes”, the process proceeds toS503 If the result of the determination is “No”, the process proceeds toS504.

[0065] In S503, the number of calculation directions is set to 7, anddirection identification numbers at this time are set to 18 to 23, and0. Then, the process proceeds to S519.

[0066] The number of calculation directions is a total number ofrepresentative values to be calculated, and also a value indicating aset number of direction identification numbers. Additionally, adirection identification number is a number for identifying 4 pixels ina predetermined direction, which include an observed pixel, and onedirection is corresponded to one direction identification number. Thesewill be described later with reference to FIG. 6.

[0067] In S504, it is determined whether or not the x coordinate of theobserved pixel is larger than Win-4, and its y coordinate is smallerthan 3. If the result of the determination is “Yes”, the processproceeds to S505. If the result of the determination is “No”, theprocess proceeds to S506.

[0068] In S505, the number of calculation directions is set to 7, anddirection identification numbers at this time are set to 12 to 18. Then,the process proceeds to S519.

[0069] In S506, it is determined whether or not the x coordinate of theobserved pixel is larger than Win-4, and its y coordinate is larger thanHin-4. If the result of the determination is “Yes”, the process proceedsto S507. If the result of the determination is “No”, the processproceeds to S508.

[0070] In S507, the number of calculation directions is set to 7, anddirection identification numbers at this time are set to 6 to 12. Then,the process proceeds to S519.

[0071] In S508, it is determined whether or not the x coordinate of theobserved pixel is smaller than 3, and its y coordinate is larger thanHin-4. If the result of the determination is “Yes”, the process proceedsto S509. If the result of the determination is “No”, the processproceeds to S510.

[0072] In S509, the number of calculation directions is set to 7, anddirection identification numbers at this time are set to 0 to 6. Then,the process proceeds to S519.

[0073] In S510, it is determined whether or not the x coordinate of theobserved pixel is smaller than 3. If the result of the determination is“Yes”, the process proceeds to S511. If the result of the determinationis “No”, the process proceeds to S512.

[0074] In S511, the number of calculation direction is set to 13, anddirection identification numbers at this time are set to 0 to 6, and 18to 23. Then, the process proceeds to S519.

[0075] In S512, it is determined whether or not the x coordinate of theobserved pixel is larger than Win-4. If the result of the determinationis “Yes”, the process proceeds to S513. If the result of thedetermination is “No”, the process proceeds to S514.

[0076] In S513, the number of calculation directions is set to 13, anddirection identification numbers at this time are set to 6 to 18. Then,the process proceeds to S519.

[0077] In S514, it is determined whether or not the y coordinate of theobserved pixel is smaller than 3. If the result of the determination is“Yes”, the process proceeds to S515. If the result of the determinationis “No”, the process proceeds to S516.

[0078] In S515, the number of calculation directions is set to 13, anddirection identification numbers at this time are set to 12 to 23, and0. Then, the process proceeds to S519.

[0079] In S516, it is determined whether or not the y coordinate of theobserved pixel is larger than Hin-4. If the result of the determinationis “Yes”, the process proceeds to S517. If the result of thedetermination is “No”, the process proceeds to S518.

[0080] In S517, the number of calculation directions is set to 13, anddirection identification numbers at this time are set to 0 to 12. Then,the process proceeds to S519.

[0081] In S518, the number of calculation directions is set to 24, anddirection identification numbers at this time are set to 0 to 23. Inthis step, if there seems no necessity to remove the noise of image datastrictly according to the values set by the gain setting means 5, theaperture correction setting means 15, and the recording image sizesetting means 19, for example, if a set gain value is small, if a setaperture correction level is low, if a set image size is small, or thelike, the number of calculation directions may be set to a small valuein consideration of shortening of processing time, and directionidentification numbers corresponding to that number of calculationdirections may be set. For instance, the number of calculationdirections is set to 16, and direction identification numbers at thattime are set to 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21 and23. Or, the number of calculation directions is set to 8, and directionidentification numbers at that time are set to 0, 3, 6, 9, 12, 15, 18,and 21.

[0082] As described above, with the processes in S502 to S518, it isdetermined, based on an image size Win×Hin and the coordinates (x, y) ofan observed pixel at that time, whether or not the observed pixel existsat a predetermined end or close to the end of an image represented byimage data, and a predetermined number of calculation directions, anddirection identification numbers at that time are set according to theresult of the determination.

[0083] In S519, the number of calculated directions is set to 1.

[0084] In S520, a calculation direction is selected. That is, anunselected direction identification number is selected in ascendingorder of identification numbers from among the set directionidentification numbers.

[0085] In S521, a weighted average value of the level values of 4pixels, which correspond to the direction identification number beingselected and include the observed pixel, is obtained, and its value isset as a representative value corresponding to the directionidentification number. How to obtain a weighted average value in thispreferred embodiment will be described later with reference to FIG. 6.

[0086] In S522, it is determined whether or not the set number ofcalculation directions is equal to the number of calculated directions.If the result of this determination is “Yes”, the process proceeds toS524. If the result of the determination is “No”, the process proceedsto S523.

[0087] In S523, the number of calculated directions is incremented, andthe process returns to S520.

[0088] In S524, a representative value closest to the level value of theobserved pixel is selected from among a plurality of representativevalues (a plurality of representative values corresponding to aplurality of directions), which are obtained with the process of S521and correspond to the set direction identification numbers. However, ifa representative value having a level value that is equal to the levelvalue of the observed pixel exists, that representative value isselected.

[0089] In S525, the representative value selected in the preceding stepis replaced as the level value of the observed pixel.

[0090] In S526, it is determined whether or not the above describedprocesses of S502 to S525 have been performed for all of pixels of theimage data as an observed pixel. If the result of this determination is“Yes”, this flow is terminated. If the result of the determination is“No”, the process proceeds to S527.

[0091] In S527, the next coordinates are set as an observed pixel. Then,the process returns to S502.

[0092] In the step S527, the coordinates of the observed pixel are set,for example, in the following order. The coordinates are sequentiallyset up to (Win-1, Hin-1) in such a way that: the x coordinate is firstincremented sequentially from (0,0), and the y coordinate is incrementedand the x coordinate is reset to 0 after the x coordinate reaches Win-1;the x coordinate is again incremented sequentially, and the y coordinateis again incremented and the x coordinate is reset to 0 after the xcoordinate reaches Win-1; and the x coordinate is again incrementedsequentially.

[0093] The processes up to this point are the noise reduction process.The CPU performs this process, whereby image data whose resolution isnot so degraded, and from which noise is removed can be obtained.

[0094] Next, the above described number of calculation directions anddirection identification numbers are explained.

[0095]FIG. 6 is a schematic diagram exemplifying 4 pixels in apredetermined direction, which correspond to each directionidentification number, and include an observed pixel.

[0096] As shown in this figure, in this example, the number of types of4 pixels in a predetermined direction, which include an observed pixel,is 24 in total in correspondence with direction identification numbers.Namely, an applicable number of calculation directions in this exampleis up to 24.

[0097] Furthermore, 4 pixels including an observed pixel for eachdirection identification number are pixels named K1, K2, K3, and K4, andthe pixel named K1 among them is the observed pixel. As shown in thisfigure, these 4 pixels are positioned in a radial direction from theobserved pixel as a center.

[0098] Furthermore, K1, K2, K3, and K4 are coefficients corresponding tothe respective pixels (however, K1+K2+K3+K4=1), and are valuesdetermined according to the values set by the gain setting means 5, theaperture correction setting means 15, and the recording image sizesetting means 19. These K1, K2, K3, and K4 are used when a weightedaverage value is calculated in the above described process of S521 inFIG. 5. In this example, if it is assumed that the level values of therespective pixels named K1, K2, K3, and K4 are G1, G2, G3, and G4, theweighted average value is calculated by G1×K1+G2×K2+G3×K3+G4×K4. Digitsto the right of the decimal point of the weighted average value arerounded off.

[0099] Next, examples of the above described number of calculationdirections, coefficients (K1, K2, K3, and K4), and number of noisereduction times, which are determined according to the values set by thegain setting means 5, the aperture correction setting means 15, and therecording image size setting means 19, are explained.

[0100]FIG. 7 is a schematic diagram exemplifying the number ofcalculation directions, the coefficients (K1, K2, K3, and K4), and thenumber of noise reduction times.

[0101] As shown in this figure, in this example, a gain setting ofeither ISO100 or ISO400 can be made by the gain setting means 5.Additionally, an aperture correction setting of any of +1, 0, and −1 canbe made by the aperture correction setting means 15. Furthermore, arecording image size setting of either 1600×1200 or 640×480 can be madeby the recording image size setting means 19.

[0102] When predetermined set values are set by such setting means,corresponding predetermined number of calculation directions,coefficients (K1, K2, K3, and K4), and number of noise reduction times,which are shown in this figure, are set. In the example shown in thisfigure, as a gain value, an aperture correction level, and an image sizeare set to larger values, the number of calculation directions and thenumber of noise reduction times are set to larger values, andcorresponding coefficients are set, so that a strict noise removal ismade. Inversely, as the gain value, the aperture correction level, andthe image size are set to smaller values, the number of calculationdirections and the number of noise reduction times are set to smallervalues, and corresponding coefficients are set, so that the noiseremoval with a low degree of strictness is made.

[0103] For example, if ISO100 and 640×480 are respectively set as a gainvalue and an image size, the number of noise reduction times is set to0, namely, a setting is made not to perform the noise reduction process.Additionally, the number of calculation directions, and coefficients arenot set in this case. In other words, if the gain value and the imagesize are respectively set to ISO100 and 640×480, execution of the noisereduction process is prohibited. Or, if the gain value and the imagesize are set to others, the execution is permitted. The execution of thenoise reduction process may be permitted/prohibited based only on a setgain value.

[0104] Additionally, in this example, if a gain value, an aperturecorrection level, and an image size are not set by a user, defaultsettings are made. With the default settings, for example, the gainvalue, the aperture correction level, and the image size default toISO100, 0, and 640×840 respectively. Accordingly, the noise reductionprocess is not performed with the settings in this case.

[0105] Next, a result of the noise reduction process represented by theabove described flow of FIG. 5 is explained in comparison with a resultof a conventional noise reduction process.

[0106]FIGS. 8A, 8B, 8C, and 8D are schematic diagrams explaining thiscomparison. FIG. 8A exemplifies image data (input data) before the noisereduction process is performed, FIG. 8B exemplifies an LPF (Low PassFilter) used in the conventional noise reduction process, FIG. 8C showsimage data obtained with the conventional noise reduction process, andFIG. 8D shows image data obtained with the noise reduction process shownin FIG. 5.

[0107] Numerals shown in FIGS. 8A, 8C, and 8D are level values ofrespective pixels, whereas numerals shown in FIG. 8B are coefficientscorresponding to respective pixels. Additionally, in the image datashown in FIGS. 8A, 8C, and 8D, coordinates of a pixel at the upper leftis assumed to be (0,0), and horizontal and vertical directions arerespectively assumed to be x and y directions as indicated by arrows ofFIG. 8A. Furthermore, in FIG. 8A, a line like, what is called, a ruledline is assumed to be represented for pixels having coordinates from(5,3) to (11,3), and the level value of the pixel having coordinates(8,3) is assumed to become 3 due to noise although it is originally 2.

[0108] As shown in FIGS. 8A to 8C, in the conventional noise reductionprocess, a process for calculating a weighted average value of apredetermined pixel block of 3×3 in the image data shown in FIG. 8A byusing the LPF shown in FIG. 8B, and for replacing this calculated valueas the level value of the pixel at the upper left, which is the observedpixel of the pixel block of 3×3, is repeated. Here, the weighted averagevalue is calculated as follows. Namely, in the predetermined pixel blockof 3×3, the level values of the pixels are respectively multiplied bythe coefficients that are shown in FIG. 8B and correspond to therespective pixels, and a sum of multiplication results is divided by asum of the coefficients, so that the weighted average value iscalculated. However, digits to the right of the decimal point of thisdivision result are rounded off. For example, the weighted average valueof the pixel block of 3×3, which is represented by the thick line ofFIG. 8A, results in 10 by calculating(10×1+10×2+10×1+10×2+10×4+10×2+10×1+10×2+10×1)/(1+2+1+2+4+2+1+2+1).

[0109] Accordingly, the level value of the pixel at the upper left,which is the observed pixel in this case, is replaced with 10 indicatedby the thick line of FIG. 8C. The process is similarly performed byshifting such a pixel block of 3×3 by one pixel, whereby the image datashown in FIG. 8C is obtained. For example, the level value of anobserved pixel (the pixel indicated by a thick line) having coordinates(4,2) in the image data shown in FIG. 8C is replaced with 7 based on thepixel block of 3×3 centering around the pixel (which is indicated by thethick line and has a level value 2) having the coordinates (5,3) in theimage data shown in FIG. 8A. Additionally, the level value of anobserved pixel (shaded pixel) having coordinates (7,2) in the image datashown in FIG. 8C is replaced with 6 based on the pixel block of 3×3centering around the pixel (which is shaded and has the level value 3)having the coordinates (8,3) in the image data shown in FIG. 8A.However, since such a pixel block of 3×3 is applicable up to the thirdpixels from the bottom and from the right of the image data shown inFIG. 8A, the size of obtained image data results in a size from which 2pixels from the bottom and from the right of the image data before beingprocessed are respectively omitted as shown in FIG. 8C.

[0110] For the image data (FIG. 8C) thus obtained with the conventionalnoise reduction process, its resolution can be identified as beingsignificantly degraded in comparison with the image data (FIG. 8A)before being processed. For example, if a comparison is made between thepixels from the coordinates (5,3) to the coordinates (11,3) and theirneighboring pixels in the image data before being processed, leveldifferences become small between corresponding pixels in the image dataafter being processed, although big level differences originally exist.Besides, level values of pixels in an extensive range are replaced withvalues different from those before being processed. As a result, animage having low resolution, namely, a “blurred” image (image data) isobtained.

[0111] In the meantime, as shown in FIG. 8D, for the image data obtainedwith the noise reduction process shown in FIG. 5, its resolution is notalmost degraded. By way of example, for pixels corresponding to thepixels from the coordinates (5,3) to the coordinates (11,3), and theirneighboring pixels in the above described image data before beingprocessed, level value differences similar to those before beingprocessed are obtained, and a degradation of the resolution is notidentified. Additionally, it can be also identified that the level value3 of the pixel having the coordinates (8,3) in the image data beforebeing processed is replaced with the level value 2, and noise is removedby the process shown in FIG. 5.

[0112] As described above, it can be identified that the resolution ofimage data obtained with the noise reduction process shown in FIG. 5 isnot almost degraded in comparison with image data obtained with theconventional noise reduction process.

[0113] Next, a second preferred embodiment according to the presentinvention is explained.

[0114]FIG. 9 is a block diagram exemplifying the configuration of anoise reduction system according to the second preferred embodiment ofthe present invention.

[0115] The noise reduction system shown in this figure (hereinafterreferred to simply as a system) is configured by comprising aninput/output unit 25, a CPU 26, an SDRAM 27, an operation unit 28, andthe like.

[0116] The input/output unit 25 is intended to input image data (digitaldata) to this system, and to output image data from this system, and isan interface that can transfer image data, for example, between thissystem and a recording medium such as a memory card, etc., which isinserted into this system, or between this system and an external deviceconnected via a cable, etc.

[0117] The CPU 26 is a central processing unit, and controls theoperations of the whole of this system by executing a program prestoredin an internal memory. For instance, the CPU 26 performs, for example, acontrol for noise removal (reduction) of image data input from theinput/output unit 25 according to a setting instructed via the operationunit 28, and the like.

[0118] The SDRAM 27 is a memory used as a working area for performingthe control process by the CPU 26. For example, image data beingprocessed is temporarily stored.

[0119] The operation unit 28 is a generic name of various types ofsetting switches, buttons, etc., which are operated to instruct varioustypes of operations and settings. Via this operation unit 28, forexample, instructions to set a gain value, an aperture correction level,an image size, etc. are notified to the CPU 26.

[0120] Up to this point is the configuration of the system in thisexample.

[0121] The control processes of the system having the above describedconfiguration, which are performed by the CPU 26, are implemented insuch a way that the CPU 26 reads and executes the program stored in theinternal memory. As the control processes, processes similar to theabove described processes shown in FIGS. 3 and 5 are performed. In thiscase, image data is stored in the SDRAM as shown in the above describedFIG. 4 during the process shown in FIG. 3. Furthermore, the numbers ofcalculation directions and the direction identification numbers, whichare used in the process shown in FIG. 5, are based on FIG. 6, and thenumbers of calculation directions, the coefficients, and the numbers ofnoise reduction times, which are set, are set based on FIG. 7.

[0122] As a result, image data whose degradation is not so degraded, andfrom which noise is removed is obtained.

[0123] In the above described first and second preferred embodiments, arepresentative value of each direction identification number iscalculated based on corresponding 4 pixels as shown in FIG. 6. However,the number of pixels is not limited to 4, and may be other numbers.Additionally, the total number of calculation direction is assumed to be24. However, that number is not limited to 24, and may be other numbers.Furthermore, the pixel named K1 is assumed as an observed pixel.However, any of K2, K3, and K4 may be assumed as an observed pixel.

[0124] Still further, the first and the second preferred embodimentsdisclose the examples where the number of calculation directions, thecoefficients (K1, K2, K3, and K4), and the number of noise reductiontimes are set based on the contents shown in FIG. 7. However, each ofthem may be set according to any one or a combination of the gain valueset by the gain setting means 5, the aperture correction level set bythe aperture correction setting means 15, and the recording image sizeset by the recording image size setting means 19.

[0125] Still further, in the first and the second preferred embodiments,a total value of values obtained by multiplying the respective levelvalues of 4 pixels by corresponding coefficients is assumed as arepresentative value. However, for example, an average value or a medianvalue of the values obtained by multiplying the respective level valuesof 4 pixels by the corresponding coefficients may be assumed as arepresentative value. Or an average value or a median value of therespective level values of 4 pixels may be assumed as a representativevalue. The median value is a value obtained, for example, by extractingthe minimum value and the maximum value from among obtained 4 values,and by calculating (the minimum value + the maximum value)/2. Or, themedian value may be a value closest to the value, which is obtained bycalculating (the minimum value + the maximum value)/2, among obtained 4values, or the second or the third value when obtained 4 values arearranged in ascending or descending order.

[0126] Still further, in the first and the second preferred embodiments,a representative value closest to the level value of an observed pixelis selected from among a plurality of representative values as indicatedby the process of S524 in FIG. 5. However, one representative value maybe selected based on a different condition.

[0127] Still further, in the first and the second preferred embodiments,a total value of values obtained by multiplying the respective levelvalues of corresponding 4 pixels by corresponding coefficients isobtained as a representative value for each set direction identificationnumber, and a value closest to the level value of an observed pixelamong representative values of respective direction identificationnumbers is replaced as the level value of the observed pixel. However,for example, a standard deviation is obtained from the level values ofcorresponding 4 pixels for each set direction identification number, andthe level value of a pixel adjacent to the observed pixel of a directionidentification number, whose standard deviation is the smallest, may bereplaced as the level value of the observed pixel.

[0128] Still further, in the first and the second preferred embodiments,for example, a computer shown in FIG. 10 may be made to execute thecontrol processes, which are performed by the CPU comprised by theelectronic camera shown in FIG. 1 or the CPU 26 of the noise reductionsystem shown in FIG. 9. In this case, the program stored in the internalmemory of the CPU of the electronic camera or the CPU 26 may be storedonto a portable storage medium 31 such as a CD-ROM, a floppy disk (or anMO, a DVD, a CD-R, a CD-RW, a removable hard disk, etc.), or the like asshown in this figure, the portable storage medium 31 may be read by amedium driving device 33 of the computer 32, the read program may bestored in an internal memory (RAM or a hard disk, etc.) 34 of thecomputer 32, and the program may be executed by the computer 32. Or, theprogram may be stored in a storage means (database, etc.) 35 within anexternal device (server, etc.) of an information provider, andtransferred to the computer 32 via a communication, and stored in theinternal memory 34, and the computer 32 may execute the program. Notethat the program stored in the memory, the storage medium, or thestorage means may be a program that executes only part of the controlprocesses performed by the CPU of the above described camera or the CPU26.

[0129] As described above, the noise reduction system, the noisereduction method, the recording medium recording the noise reductionprogram, and the electronic camera according to the present inventionare explained in detail. However, the present invention is not limitedto the above described preferred embodiments, and various types ofimprovements and modifications may be made in a scope which does notdeviate from the gist of the present invention, as a matter of course.

[0130] As explained above in detail, according to the present invention,noise can be removed while preventing resolution from being degraded,and what is called a “blurred” image can be prevented from beingobtained after the noise removal process is performed.

What is claimed is:
 1. A noise reduction system, comprising: aninputting unit inputting image data; and a noise reduction unitperforming a process for removing noise of the image data input by saidinputting unit, wherein said noise reduction unit comprises arepresentative value calculating unit calculating a representative valuefrom level values of a plurality of pixels in a predetermined direction,which include an observed pixel of the input image data, arepresentative value selecting unit selecting one representative valueaccording to a predetermined condition from among a plurality ofrepresentative values which are calculated by said representative valuecalculating unit, and correspond to a plurality of directions, and areplacing unit replacing a level value of the observed pixel with therepresentative value selected by said representative value selectingunit.
 2. The system according to claim 1, wherein said representativevalue calculating unit calculates an average value or a median value ofthe level values of the plurality of pixels as a representative value.3. The system according to claim 1, wherein said representative valuecalculating unit calculates an average value or a median value ofvalues, which are obtained by multiplying the respective level values ofthe plurality of pixels by coefficients corresponding to the pixels, asa representative value.
 4. The system according to claim 1, wherein thepredetermined direction is a radial direction from the observed pixel asa center.
 5. The system according to claim 1, wherein saidrepresentative value selecting unit selects a representative valueclosest to the level value of the observed pixel from among theplurality of representative values corresponding to the plurality ofdirections.
 6. The system according to claim 1, wherein the processperformed by said noise reduction unit is applied to same image data bya plurality of times.
 7. The system according to claim 1, furthercomprising: an image size storing unit storing an image size of theimage data; an observed pixel coordinates storing unit storingcoordinates of the observed pixel; an end determining unit determiningwhether or not the observed pixel exists at an end or close to the endof an image based on the image data on the basis of the image size ofthe image data, which is stored in said image size storing unit, and thecoordinates of the observed pixel, which are stored in said observedpixel coordinates storing unit; and a changing unit changing thepredetermined direction if the observed pixel is determined to exist atthe end or close to the end by said end determining unit.
 8. A noisereduction method removing noise of input image data, comprising:calculating a representative value from level values of a plurality ofpixels in a predetermined direction, which include an observed pixel ofthe input image data; selecting one representative value according to apredetermined condition from among a plurality of calculatedrepresentative values corresponding to a plurality of directions; andreplacing a level value of the observed pixel with the selectedrepresentative value.
 9. A recording medium on which is recorded aprogram for causing a computer to execute a control for removing noiseof input image data, the control comprising: calculating arepresentative value from level values of a plurality of pixels in apredetermined direction, which include an observed pixel of the inputimage data; selecting one representative value according to apredetermined condition from among a plurality of calculatedrepresentative values corresponding to a plurality of directions; andreplacing a level value of the observed pixel with the selectedrepresentative value.
 10. An electronic camera, comprising: an imagecapturing element; an A/D converting unit performing A/D conversion foran analog image signal output from said image capturing element; a colorseparating unit generating a plurality of pieces of image data forrespective predetermined color components from image data based on anoutput of said A/D converting unit; and a noise reduction unitperforming a process for removing noise from image data of apredetermined color component among the plurality of pieces of imagedata for the respective color components, which are generated by saidcolor separating unit, wherein said noise reduction unit comprises arepresentative value calculating unit calculating a representative valuefrom level values of a plurality of pixels in a predetermined direction,which include an observed pixel of the image data of the predeterminedcolor component, a representative value selecting unit selecting onerepresentative value according to a predetermined condition from among aplurality of representative values which are calculated by saidrepresentative value calculating unit, and correspond to a plurality ofdirections, and a replacing unit replacing a level value of the observedpixel with the representative value selected by said representativevalue selecting unit.
 11. The electronic camera according to claim 10,wherein said representative value calculating unit calculates an averagevalue or a median value of the level values of the plurality of pixelsas a representative value.
 12. The electronic camera according to claim10, wherein said representative value calculating unit calculates anaverage value or a median value of values, which are obtained bymultiplying the respective level values of the plurality of pixels bycoefficients corresponding to the pixels, as a representative value. 13.The electronic camera according to claim 10, wherein the predetermineddirection is a radial direction from the observed pixel as a center. 14.The electronic camera according to claim 10, wherein said representativevalue selecting unit selects a representative value closest to the levelvalue of the observed pixel from among the plurality of representativevalues corresponding to the plurality of directions.
 15. The electroniccamera according to claim 10, wherein the process performed by saidnoise reduction unit is applied to same image data by a plurality oftimes.
 16. The electronic camera according to claim 12, furthercomprising: a gain controlling unit amplifying an output of said imagecapturing element according to a setting for a gain; an aperturecorrecting unit extracting an edge component from image data based on anoutput of said gain controlling unit, and emphasizing the edge componentaccording to a setting for an aperture correction; and a resizing unitresizing an image size of image data according to a setting forresizing, wherein at least any of the plurality of directions and thecoefficients is changed according to any of the setting for a gain, thesetting for an aperture correction, and the setting for resizing. 17.The electronic camera according to claim 15, further comprising: a gaincontrolling unit amplifying an output of said image capturing elementaccording to a setting for a gain; an aperture correcting unitextracting an edge component from image data based on an output of saidgain controlling unit, and emphasizing the edge component according to asetting for an aperture correction; and a resizing unit resizing animage size of image data according to the setting for resizing, whereina number of times that the process performed by said noise reductionunit is applied is changed according to any of the setting for a gain,the setting for an aperture correction, and the setting for resizing.18. The electronic camera according to claim 16, wherein execution ofthe process performed by said noise reduction unit is permitted orprohibited according to the setting for a gain.
 19. The electroniccamera according to claim 17, wherein execution of the process performedby said noise reduction unit is permitted or prohibited according to thesetting for a gain.
 20. The electronic camera according to claim 10,further comprising: an image size storing unit storing an image size ofthe image data; an observed pixel coordinates storing unit storingcoordinates of the observed pixel; an end determining unit determiningwhether or not the observed pixel exists at an end or close to the endof an image based on the image data on the basis of the image size ofthe image data, which is stored in said image size storing unit, and thecoordinates of the observed pixel, which are stored in said observedpixel coordinates storing unit; and a changing unit changing theplurality of directions if the observed pixel is determined to exist atthe end or close to the end by said end determining unit.
 21. Theelectronic camera according to claim 16, further comprising: an imagesize storing unit storing an image size of the image data; an observedpixel coordinates storing unit storing coordinates of the observedpixel; an end determining unit determining whether or not the observedpixel exists at an end or close to the end of an image based on theimage data on the basis of the image size of the image data, which isstored in said image size storing unit, and the coordinates of theobserved pixel, which are stored in said observed pixel coordinatesstoring unit; and a changing unit changing the plurality of directionsif the observed pixel is determined to exist at the end or close to theend by said end determining unit.
 22. The electronic camera according toclaim 17, further comprising: an image size storing unit storing animage size of the image data; an observed pixel coordinates storing unitstoring coordinates of the observed pixel; an end determining unitdetermining whether or not the observed pixel exists at an end or closeto the end of an image based on the image data on the basis of the imagesize of the image data, which is stored in said image size storing unit,and the coordinates of the observed pixel, which are stored in saidobserved pixel coordinates storing unit; and a changing unit changingthe plurality of directions if the observed pixel is determined to existat the end or close to the end by said end determining unit.
 23. Theelectronic camera according to claim 18, further comprising: an imagesize storing unit storing an image size of the image data; an observedpixel coordinates storing unit storing coordinates of the observedpixel; an end determining unit determining whether or not the observedpixel exists at an end or close to the end of an image based on theimage data on the basis of the image size of the image data, which isstored in said image size storing unit, and the coordinates of theobserved pixel, which are stored in said observed pixel coordinatesstoring unit; and a changing unit changing the plurality of directionsif the observed pixel is determined to exist at the end or close to theend by said end determining unit.
 24. The electronic camera according toclaim 19, further comprising: an image size storing unit storing animage size of the image data; an observed pixel coordinates storing unitstoring coordinates of the observed pixel; an end determining unitdetermining whether or not the observed pixel exists at an end or closeto the end of an image based on the image data on the basis of the imagesize of the image data, which is stored in said image size storing unit,and the coordinates of the observed pixel, which are stored in saidobserved pixel coordinates storing unit; and a changing unit changingthe plurality of directions if the observed pixel is determined to existat the end or close to the end by said end determining unit.
 25. Anelectronic camera, comprising: an image capturing element; an A/Dconverting unit performing A/D conversion for an analog image signaloutput from said image capturing element; an edge separating unitextracting an edge component from image data based on an output of saidA/D converting unit, and generating image data; and a noise reductionunit performing a process for removing noise from the image datagenerated by said edge separating unit, wherein said noise reductionunit comprises a representative value calculating unit calculating arepresentative value from level values of a plurality of pixels in apredetermined direction, which include an observed pixel of the imagedata generated by said edge separating unit, a representative valueselecting unit selecting one representative value according to apredetermined condition from among a plurality of representative valueswhich are calculated by said representative value calculating unit andcorrespond to a plurality of directions, and a replacing unit replacinga level value of the observed pixel with the representative valueselected by said representative value selecting unit.
 26. The electroniccamera according to claim 25, wherein said representative valuecalculating unit calculates an average value or a median value of thelevel values of the plurality of pixels as a representative value. 27.The electronic camera according to claim 25, wherein said representativevalue calculating unit calculates an average value or a median value ofvalues, which are obtained by multiplying the respective level values ofthe plurality of pixels by coefficients corresponding to the pixels, asa representative value.
 28. The electronic camera according to claim 25,wherein the predetermined direction is a radial direction from theobserved pixel as a center.
 29. The electronic camera according to claim25, wherein said representative value selecting unit selects arepresentative value closest to the level value of the observed pixelfrom among the plurality of representative values corresponding to theplurality of directions.
 30. The electronic camera according to claim25, wherein the process performed by said noise reduction unit isapplied to same image data by a plurality of times.
 31. The electroniccamera according to claim 27, further comprising: a gain controllingunit amplifying an output of said image capturing element according to asetting for a gain; an aperture correcting unit extracting an edgecomponent from image data based on an output of said gain controllingunit, and emphasizing the edge component according to a setting for anaperture correction; and a resizing unit resizing an image size of imagedata according to a setting for resizing, wherein at least any of theplurality of directions and the coefficients is changed according to anyof the setting for a gain, the setting for an aperture correction, andthe setting for resizing.
 32. The electronic camera according to claim30, further comprising: a gain controlling unit amplifying an output ofsaid image capturing element according to a setting for a gain; anaperture correcting unit extracting an edge component from image databased on an output of said gain controlling unit, and emphasizing theedge component according to a setting for an aperture correction; and aresizing unit resizing an image size of image data according to asetting for resizing, wherein a number of times that the processperformed by said noise reduction unit is applied is changed accordingto any of the setting for a gain, the setting for an aperturecorrection, and the setting for resizing.
 33. The electronic cameraaccording to claim 31, wherein execution of the process performed bysaid noise reduction unit is permitted or prohibited according to thesetting for a gain.
 34. The electronic camera according to claim 32,wherein execution of the process performed by said noise reduction unitis permitted or prohibited according to the setting for a gain.
 35. Theelectronic camera according to claim 25, further comprising: an imagesize storing unit storing an image size of the image data; an observedpixel coordinates storing unit storing coordinates of the observedpixel; an end determining unit determining whether or not the observedpixel exists at an end or close to the end of an image based on theimage data on the basis of the image size of the image data, which isstored in said image size storing unit, and the coordinates of theobserved pixel, which are stored in said observed pixel coordinatesstoring unit; and a changing unit changing the plurality of directionsif the observed pixel is determined to exist at the end or close to theend by said end determining unit.
 36. The electronic camera according toclaim 31, further comprising: an image size storing unit storing animage size of the image data; an observed pixel coordinates storing unitstoring coordinates of the observed pixel; an end determining unitdetermining whether or not the observed pixel exists at an end or closeto the end of an image based on the image data on the basis of the imagesize of the image data, which is stored in said image size storing unit,and the coordinates of the observed pixel, which are stored in saidobserved pixel coordinates storing unit; and a changing unit changingthe plurality of directions if the observed pixel is determined to existat the end or close to the end by said end determining unit.
 37. Theelectronic camera according to claim 32, further comprising: an imagesize storing unit storing an image size of the image data; an observedpixel coordinates storing unit storing coordinates of the observedpixel; an end determining unit determining whether or not the observedpixel exists at an end or close to the end of an image based on theimage data on the basis of the image size of the image data, which isstored in said image size storing unit, and the coordinates of theobserved pixel, which are stored in said observed pixel coordinatesstoring unit; and a changing unit changing the plurality of directionsif the observed pixel is determined to exist at the end or close to theend by said end determining unit.
 38. The electronic camera according toclaim 33, further comprising: an image size storing unit storing animage size of the image data; an observed pixel coordinates storing unitstoring coordinates of the observed pixel; an end determining unitdetermining whether or not the observed pixel exists at an end or closeto the end of an image based on the image data on the basis of the imagesize of the image data, which is stored in said image size storing unit,and the coordinates of the observed pixel, which are stored in saidobserved pixel coordinates storing unit; and a changing unit changingthe plurality of directions if the observed pixel is determined to existat the end or close to the end by said end determining unit.
 39. Theelectronic camera according to claim 34, further comprising: an imagesize storing unit storing an image size of the image data; an observedpixel coordinates storing unit storing coordinates of the observedpixel; an end determining unit determining whether or not the observedpixel exists at an end or close to the end of an image based on theimage data on the basis of the image size of the image data, which isstored in said image size storing unit, and the coordinates of theobserved pixel, which are stored in said observed pixel coordinatesstoring unit; and a changing unit changing the plurality of directionsif the observed pixel is determined to exist at the end or close to theend by said end determining unit.
 40. A noise reduction method of anelectronic camera, comprising: (a) performing A/D conversion for ananalog image signal output from an image capturing element; (b)generating a plurality of pieces of image data for respectivepredetermined color components based on image data for which the A/Dconversion is performed; and (c) removing noise from image data of apredetermined color component among the plurality of pieces of generatedimage data for the respective color components, wherein in the step (c),a representative value is calculated from level values of a plurality ofpixels in a predetermined direction, which include an observed pixel ofthe image data of the predetermined color component, one representativevalue is selected according to a predetermined condition from among aplurality of calculated representative values corresponding to aplurality of directions, and a level value of the observed pixel isreplaced with the selected representative value.
 41. A noise reductionmethod of an electronic camera, comprising: (a) performing A/Dconversion for an analog image signal output from an image capturingelement; (b) extracting an edge component based on image data for whichthe A/D conversion is performed, and generating image data; and (c)removing noise from the generated image data, wherein in the step (c), arepresentative value is calculated from level values of a plurality ofpixels in a predetermined direction, which include an observed pixel ofthe generated image data, one representative value is selected accordingto a predetermined condition from among a plurality of calculatedrepresentative values corresponding to a plurality of directions, and alevel value of the observed pixel is replaced with the selectedrepresentative value.